-
Notifications
You must be signed in to change notification settings - Fork 3
Feat/quick setup #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Feat/quick setup #56
Conversation
Co-authored-by: omsherikar <180152315+omsherikar@users.noreply.github.com>
Co-authored-by: omsherikar <180152315+omsherikar@users.noreply.github.com>
Co-authored-by: omsherikar <180152315+omsherikar@users.noreply.github.com>
Co-authored-by: omsherikar <180152315+omsherikar@users.noreply.github.com>
Pin pre-commit version and align installation logic between bash and Windows setup scripts
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. π WalkthroughWalkthroughAdded pre-commit to dev requirements, removed pip fallback installs from POSIX and Windows dev setup scripts, adjusted POSIX script to extract and install both Sphinx and pre-commit extras and to require the Changes
Sequence Diagram(s)(omitted β changes are script and dependency updates without multi-component control-flow requiring visualization) Estimated code review effortπ― 3 (Moderate) | β±οΈ ~20 minutes Possibly related PRs
Poem
Pre-merge checksβ Failed checks (1 inconclusive)
β Passed checks (2 passed)
π Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro π Files selected for processing (1)
π Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR attempts to simplify the pre-commit setup process by adding pre-commit as an explicit dependency in requirements-dev.txt and removing conditional installation logic from the development setup scripts. However, there are critical issues with this implementation that will cause setup failures on Unix/Linux systems.
Key changes:
- Added pre-commit==4.5.1 to requirements-dev.txt
- Removed pre-commit installation logic from setup_dev.sh (conditional checks and pip install)
- Removed pre-commit pip installation from setup_dev.bat
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| setup_dev.sh | Simplified pre-commit hook installation by removing conditional checks for pre-commit availability |
| setup_dev.bat | Removed explicit pip install for pre-commit, assuming it will be installed via requirements-dev.txt |
| requirements-dev.txt | Added pre-commit version 4.5.1 as an explicit development dependency |
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
setup_dev.sh
Outdated
| pre-commit install | ||
| echo "β Pre-commit hooks installed" | ||
| fi | ||
| pre-commit install |
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error handling has been removed when calling pre-commit install. If pre-commit is not installed or if the installation fails, the script will exit immediately due to the 'set -e' at line 6, but there won't be a user-friendly error message explaining what went wrong. Consider adding error checking with a clear error message like the original code had.
| pre-commit install | |
| if ! command -v pre-commit &> /dev/null; then | |
| echo "β Error: pre-commit is not installed in this environment." | |
| echo "Please install it (e.g., inside the virtual environment) and re-run this script:" | |
| echo " pip install pre-commit" | |
| exit 1 | |
| fi | |
| if ! pre-commit install; then | |
| echo "β Error: Failed to install pre-commit hooks." | |
| echo "Please check the pre-commit configuration and try running:" | |
| echo " pre-commit install" | |
| exit 1 | |
| fi |
| @@ -73,15 +73,8 @@ fi | |||
| # Install pre-commit hooks | |||
| echo "" | |||
| echo "π§ Setting up pre-commit hooks..." | |||
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pre-commit command will fail on Unix/Linux systems because pre-commit is not being installed. The setup_dev.sh script only installs sphinx-related dependencies from requirements-dev.txt (see lines 64-68 which use grep to filter only sphinx packages), so adding pre-commit to requirements-dev.txt won't actually install it. You need to either:
- Add pre-commit to the [dev] optional dependencies in pyproject.toml, or
- Update the grep filter in setup_dev.sh to also include pre-commit packages, or
- Explicitly install pre-commit before calling pre-commit install
| echo "π§ Setting up pre-commit hooks..." | |
| echo "π§ Setting up pre-commit hooks..." | |
| echo "π₯ Ensuring pre-commit is installed..." | |
| if ! command -v pre-commit >/dev/null 2>&1; then | |
| pip install pre-commit --quiet | |
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and canβt be posted inline due to platform limitations.
β οΈ Outside diff range comments (1)
setup_dev.sh (1)
1-1: Minor: Fix end-of-file formatting.The pre-commit end-of-file-fixer hook detected a missing newline at the end of the file. This has been auto-fixed by the hook, but you may need to commit the change.
Based on pipeline failures.
π Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
π Files selected for processing (3)
requirements-dev.txtsetup_dev.batsetup_dev.sh
π€ Files with no reviewable changes (1)
- setup_dev.bat
π§° Additional context used
πͺ GitHub Actions: Pre-commit
setup_dev.sh
[error] 1-1: End-of-file-fixer hook modified the file 'setup_dev.sh'.
β° Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Agent
|
@copilot the ci are failing fix it |
|
@omsherikar I've opened a new pull request, #57, to work on those changes. Once the pull request is ready, I'll request review from you. |
The grep pattern now includes both sphinx and pre-commit packages. Also added error handling if pre-commit is not found. Co-authored-by: omsherikar <180152315+omsherikar@users.noreply.github.com>
β¦ndencies Co-authored-by: omsherikar <180152315+omsherikar@users.noreply.github.com>
Co-authored-by: omsherikar <180152315+omsherikar@users.noreply.github.com>
[WIP] Fix quick setup issues in code
|
@copilot still CI failing 7s Successfully installed astroid-3.3.11 click-8.1.8 colorama-0.4.6 libcst-1.8.6 mando-0.7.1 markdown-it-py-3.0.0 mdurl-0.1.2 pygments-2.19.2 pyyaml-6.0.3 radon-6.0.1 refactron-1.0.0 rich-14.2.0 six-1.17.0 typing-extensions-4.15.0 |
|
@omsherikar I've opened a new pull request, #58, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: omsherikar <180152315+omsherikar@users.noreply.github.com>
Co-authored-by: omsherikar <180152315+omsherikar@users.noreply.github.com>
Fix pre-commit version incompatibility with Python 3.8-3.9
|
@copilot still the ci failing |
|
@omsherikar I've opened a new pull request, #59, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: omsherikar <180152315+omsherikar@users.noreply.github.com>
Fix pre-commit version constraint for Python 3.8-3.9 compatibility
β¦another-one Revert "Fix pre-commit version constraint for Python 3.8-3.9 compatibility"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
π Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
π Files selected for processing (1)
requirements-dev.txt
π§° Additional context used
πͺ GitHub Actions: CI
requirements-dev.txt
[error] 1-1: Command failed: pip install -r requirements-dev.txt. No matching distribution found for pre-commit==4.3.0
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Pull Request
π Description
A clear and concise description of what this PR does.
π Related Issue
Closes #(issue number)
π§ͺ Type of Change
π§ͺ Testing
π Changes Made
π― Code Quality
π Documentation
π Security
π Performance
π Checklist
π¨ Screenshots (if applicable)
Add screenshots to help explain your changes.
π Additional Notes
Add any other context about the PR here.
π Reviewers
@omsherikar - Please review this PR
π·οΈ Labels
Please add appropriate labels to this PR:
bug- Bug fixenhancement- New featuredocumentation- Documentation updatedependencies- Dependency updatesecurity- Security updateperformance- Performance improvementrefactoring- Code refactoringtesting- Test updatesbreaking-change- Breaking changegood-first-issue- Good for new contributorshelp-wanted- Help neededpriority-high- High prioritypriority-medium- Medium prioritypriority-low- Low prioritySummary by CodeRabbit
Chores
Documentation
βοΈ Tip: You can customize this high-level summary in your review settings.